Skip to content

fix: scroll to the current search match when the search term changes - #4314

Merged
AlexAndBear merged 1 commit into
mainfrom
fix/editor-search-scroll-on-term-change
Nov 6, 2026
Merged

AlexAndBear merged 1 commit into
mainfrom
fix/editor-search-scroll-on-term-change

Conversation

@AlexAndBear

Copy link
Copy Markdown
Member

Description

Search and replace in the text editor now scrolls to the current match when you change the search term or an option like match case, not only when the match number changes, so the match no longer stays off screen.

Related Issue

How Has This Been Tested?

  • test environment: unit tests (Vitest), browser tests (Playwright) against a local OpenCloud
  • test case 1: unit: the panel scrolls when the term or an option changes with the same position, and doesn't scroll when only the document changes
  • test case 2: browser: .md and .txt (desktop and Pixel 7): term change and match case / whole words toggles scroll to the match; no jumps on edits, undo/redo, remote edits or replace term changes; next/previous, replace, replace all and reopening the panel unchanged

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

@AlexAndBear
AlexAndBear merged commit 7b559eb into main Nov 6, 2026
29 checks passed
@AlexAndBear
AlexAndBear deleted the fix/editor-search-scroll-on-term-change branch November 6, 2026 12:54
@openclouders openclouders mentioned this pull request Nov 6, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Search and replace doesn't scroll to the match when the search term changes

2 participants